#pragma once
#include <iostream>
#include <string>


namespace mian_yang
{
    /*定义日志等级， 以后的日志等级直接从这里去即可*/
    class LogLevel
    {
    public:
        enum value         /*相当于一个全局类型*/
        {
            UNKNOW = 0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };

        static std::string toString(mian_yang::LogLevel::value level)
        {
            switch(level)
            {
                case LogLevel::value::DEBUG: return "DEBUG";
                case LogLevel::value::INFO: return "INFO";
                case LogLevel::value::WARN: return "WARN";
                case LogLevel::value::ERROR: return "ERROR";                
                case LogLevel::value::FATAL: return "FATAL";
                case LogLevel::value::OFF: return "OFF";
            }

            return "UNKNOW";
        }

    };
}
